package com.du.yuchenweather;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.Handler;
import android.os.IBinder;

import androidx.annotation.Nullable;

import org.litepal.LitePalApplication;

public class WeatherService extends Service {

    private Handler mHandlerWeather;

    @Override
    public void onCreate() {
        super.onCreate();

    }

    @Override
    public void onDestroy() {
        super.onDestroy();
    }

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return new WeatherBinder();
    }

    public class WeatherBinder extends Binder {
        public void sendHandler(Handler handler) {
            mHandlerWeather = handler;
        }

        public void distoryHandler() {
            mHandlerWeather = null;
        }
    }
}

